﻿using AutoMapper;
using Ccteg.DB;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
using System.Linq;
using System.Security.Claims;

namespace Cctegaq.Api.Controllers.Api.V1.Rbac
{
    /// <summary>
    /// 三方授权
    /// </summary>
    [ApiController]
    [Route("[controller]/[action]")]
    public class AuthorzationController : ControllerBase
    {
        private readonly MySqlDbContext _dbContext;
        private readonly IMapper _mapper;
        /// <summary>
        /// 
        /// </summary>
        /// <param name="dbContext"></param>
        /// <param name="mapper"></param>
        public AuthorzationController(MySqlDbContext dbContext, IMapper mapper)
        {
            _dbContext = dbContext;
            _mapper = mapper;
        }
        /// <summary>
        /// 认证中心 集团认证二级单位
        /// </summary>
        /// <param name="token"></param>
        /// <returns></returns>
        [HttpPost]
        [Route("/Authorzation/verification/{token}")]
        public IActionResult verification([System.Web.Http.FromUri] string token)
        {
            return Ok(new { code = "1", data = "true", message = "测试验证成功" });

        }
        [HttpGet]
         
        public IActionResult health()
        {
            return Ok(1);
        }
    }

}
